<div class="content">
    <div class="shoppingCart">
        <s:if test="%{#shoppingCartItemList==null || #shoppingCartItemList.size()==0}">
            <div class="uniqueMessage">
                <p>Empty Shopping Cart.</p>
            </div>
        </s:if>
        <s:else>
            <div class="itemsOnCart">
                <table>
                    <form action="updateShoppingCart" method="POST">
                        <thead>
                            <tr>
                                <th class="cQty">Quantity</th>
                                <th class="cRem"><input type="checkbox" id="mainCheckbox" name="check/uncheck all" onclick='checkedAll();'/></th>
                                <th class="cDes">Product Description</th>
                                <th class="cPri">Price</th>
                                <th class="cTot">Total Price</th>
                            </tr>
                        </thead>
                        <tbody>
                        <s:form action="updateShoppingCart">
                            <s:iterator value="shoppingCartItemList" status="i">
                                <tr>
                                    <td class="cQty">
                                <s:textfield name="qty[%{#i.index}]" value="shoppingCartItemList[%{#i.index}].getQuantity()" size="2" theme="simple"/>
                                </td>
                                <td class="cRem">
                                <s:checkbox name="rmv[%{#i.index}]" theme="simple"/>
                                </td>
                                <td class="cDes">
                                    <div class="productTinyImage">
                                        <img src="<%= request.getContextPath()%>/<s:property value="shoppingCartItemList[%{#i.index}].getProduct().getImageurl()"/>" alt="img" width="64" height="auto" />
                                    </div>
                                    <div class="productInfoCart">
                                        <s:url action="viewProduct" var="viewProductUrl">
                                            <s:param name="productId">
                                                <s:property value="shoppingCartItemList[%{#i.index}].getProduct().getIdProduct"></s:property>
                                            </s:param>
                                        </s:url>
                                        <s:a href="%{viewProductUrl}">
                                            <s:property value="shoppingCartItemList[%{#i.index}].getProduct().getName()"/>
                                        </s:a>
                                    </div>
                                <s:fielderror name="qtyLimit"/>
                                </td>
                                <td class="cPri">
                                    $<s:property value="shoppingCartItemList[%{#i.index}].getPrice()"/>
                                </td>
                                <td class="cTot">
                                    $<s:property value="shoppingCartItemList[%{#i.index}].getPrice() - shoppingCartItemList[%{#i.index}].getQuantity"/>
                                </td>
                                </tr>
                            </s:iterator>
                        </s:form>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td class="cQty">
                        <s:submit name="button" value="Update" cssStyle="display: inline; width: 76px" theme="simple"/>
                        </td>
                        <td class="cRem">
                        <s:submit name="button" value="Remove" cssStyle="display: inline; width: 76px" theme="simple"/>
                        </td>
                        <td scope="row" colspan="2" class="cPri"><b>Subtotal:</b></td>
                        <td class="cTot">$<% out.print(scart.getTotalAmount());%></td>
                        </tr>
                        </tfoot>
                    </form>
                </table>
            </div>

            <div class="buttonOnShoppingCart">
                <div class="buttonContinue">
                    <a href="<%= request.getContextPath()%>">Continue Shopping</a>
                </div>
                <div class="buttonProcess">
                    <s:url action="processOrder" var="processOrderUrl" ></s:url>
                    <s:a href="%{processOrderUrl}" >Process Order</s:a>
                </div>
            </div>
    </div>
</s:else>
</div>